package com.dev.op.enums;

public enum ResultCode {
    SUCCESS(200, "操作成功"),
    PARAM_ERROR(400, "请求参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "无权限访问"),
    NOT_FOUND(404, "资源未找到"),
    TESTCASE_MISSING(405,"未找到测试用例"),
    SYSTEM_ERROR(500, "系统异常"),
    JUDGE_SERVER_DOWN(501,"判题核心异常");

    private final int code;
    private final String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int code() { return code; }
    public String message() { return message; }
}
